function SrvApiType(params){ 
	 
}

SrvApiType.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new SrvApiType.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new SrvApiType.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new SrvApiType.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.satId=function(satId){if(this.proxy)return this.getProxy().satId(satId);  this.put("satId", satId);return this;};
	/** and sat_id is null */
	this.satIdNull=function(){if(this.proxy)return this.getProxy().satIdNull();if(this.get("satIdNot")==null)this.put("satIdNot", "");this.put("satId", null);return this;};
	/** not .... */
	this.satIdNot=function(){if(this.proxy)return this.getProxy().satIdNot();this.put("satIdNot", "not");return this;};
	this.satIdNotNull=function(){if(this.proxy)return this.getProxy().satIdNotNull();this.put("satIdNot", "not");this.put("satId", null);return this;};
	this.satIdNot=function(satId){if(this.proxy)return this.getProxy().satIdNot(satId);this.put("satIdNot", "not");this.put("satId", satId);return this;};
		
	/** and sat_id <= ? */
	this.satIdMin=function(min){if(this.proxy)return this.getProxy().satIdMin(min);this.put("satIdMin", min);return this;};
	/** and sat_id >= ? */
	this.satIdMax=function(max){if(this.proxy)return this.getProxy().satIdMax(max);this.put("satIdMax", max);return this;};
		
		
	this.satIdIn=function(ids){
		if(this.proxy)return this.getProxy().satIdIn(ids);  this.put("satIdIn", ids);return this;
	};	
		 
	
	
	/** 分类名称 [非空]       **/
	this.satName=function(satName){if(this.proxy)return this.getProxy().satName(satName);  this.put("satName", satName);return this;};
	/** and sat_name is null */
	this.satNameNull=function(){if(this.proxy)return this.getProxy().satNameNull();if(this.get("satNameNot")==null)this.put("satNameNot", "");this.put("satName", null);return this;};
	/** not .... */
	this.satNameNot=function(){if(this.proxy)return this.getProxy().satNameNot();this.put("satNameNot", "not");return this;};
	this.satNameNotNull=function(){if(this.proxy)return this.getProxy().satNameNotNull();this.put("satNameNot", "not");this.put("satName", null);return this;};
	this.satNameNot=function(satName){if(this.proxy)return this.getProxy().satNameNot(satName);this.put("satNameNot", "not");this.put("satName", satName);return this;};
		
		 
	
	
	/** 所属分类 [非空] [SrvApiType]      **/
	this.satParent=function(satParent){if(this.proxy)return this.getProxy().satParent(satParent);  this.put("satParent", satParent);return this;};
	/** and sat_parent is null */
	this.satParentNull=function(){if(this.proxy)return this.getProxy().satParentNull();if(this.get("satParentNot")==null)this.put("satParentNot", "");this.put("satParent", null);return this;};
	/** not .... */
	this.satParentNot=function(){if(this.proxy)return this.getProxy().satParentNot();this.put("satParentNot", "not");return this;};
	this.satParentNotNull=function(){if(this.proxy)return this.getProxy().satParentNotNull();this.put("satParentNot", "not");this.put("satParent", null);return this;};
	this.satParentNot=function(satParent){if(this.proxy)return this.getProxy().satParentNot(satParent);this.put("satParentNot", "not");this.put("satParent", satParent);return this;};
		
		
	this.satParentIn=function(ids){
		if(this.proxy)return this.getProxy().satParentIn(ids);  this.put("satParentIn", ids);return this;
	};	
		 
	
	
	/** 分类标识        **/
	this.satFlag=function(satFlag){if(this.proxy)return this.getProxy().satFlag(satFlag);  this.put("satFlag", satFlag);return this;};
	/** and sat_flag is null */
	this.satFlagNull=function(){if(this.proxy)return this.getProxy().satFlagNull();if(this.get("satFlagNot")==null)this.put("satFlagNot", "");this.put("satFlag", null);return this;};
	/** not .... */
	this.satFlagNot=function(){if(this.proxy)return this.getProxy().satFlagNot();this.put("satFlagNot", "not");return this;};
	this.satFlagNotNull=function(){if(this.proxy)return this.getProxy().satFlagNotNull();this.put("satFlagNot", "not");this.put("satFlag", null);return this;};
	this.satFlagNot=function(satFlag){if(this.proxy)return this.getProxy().satFlagNot(satFlag);this.put("satFlagNot", "not");this.put("satFlag", satFlag);return this;};
		
		 
	
	
	/** 修改时间 [非空]       **/
	this.satUpdateTime=function(satUpdateTime){if(this.proxy)return this.getProxy().satUpdateTime(satUpdateTime);  this.put("satUpdateTime", satUpdateTime);return this;};
	/** and sat_update_time is null */
	this.satUpdateTimeNull=function(){if(this.proxy)return this.getProxy().satUpdateTimeNull();if(this.get("satUpdateTimeNot")==null)this.put("satUpdateTimeNot", "");this.put("satUpdateTime", null);return this;};
	/** not .... */
	this.satUpdateTimeNot=function(){if(this.proxy)return this.getProxy().satUpdateTimeNot();this.put("satUpdateTimeNot", "not");return this;};
	this.satUpdateTimeNotNull=function(){if(this.proxy)return this.getProxy().satUpdateTimeNotNull();this.put("satUpdateTimeNot", "not");this.put("satUpdateTime", null);return this;};
	this.satUpdateTimeNot=function(satUpdateTime){if(this.proxy)return this.getProxy().satUpdateTimeNot(satUpdateTime);this.put("satUpdateTimeNot", "not");this.put("satUpdateTime", satUpdateTime);return this;};
		
	/** and sat_update_time >= ? */
	this.satUpdateTimeStart=function(start){if(this.proxy)return this.getProxy().satUpdateTimeStart(start);this.put("satUpdateTimeStart", start);return this;};			
	/** and sat_update_time <= ? */
	this.satUpdateTimeEnd=function(end){if(this.proxy)return this.getProxy().satUpdateTimeEnd(end);this.put("satUpdateTimeEnd", end);return this;};
		
		 
	
	
	/** 添加时间 [非空]       **/
	this.satAddTime=function(satAddTime){if(this.proxy)return this.getProxy().satAddTime(satAddTime);  this.put("satAddTime", satAddTime);return this;};
	/** and sat_add_time is null */
	this.satAddTimeNull=function(){if(this.proxy)return this.getProxy().satAddTimeNull();if(this.get("satAddTimeNot")==null)this.put("satAddTimeNot", "");this.put("satAddTime", null);return this;};
	/** not .... */
	this.satAddTimeNot=function(){if(this.proxy)return this.getProxy().satAddTimeNot();this.put("satAddTimeNot", "not");return this;};
	this.satAddTimeNotNull=function(){if(this.proxy)return this.getProxy().satAddTimeNotNull();this.put("satAddTimeNot", "not");this.put("satAddTime", null);return this;};
	this.satAddTimeNot=function(satAddTime){if(this.proxy)return this.getProxy().satAddTimeNot(satAddTime);this.put("satAddTimeNot", "not");this.put("satAddTime", satAddTime);return this;};
		
	/** and sat_add_time >= ? */
	this.satAddTimeStart=function(start){if(this.proxy)return this.getProxy().satAddTimeStart(start);this.put("satAddTimeStart", start);return this;};			
	/** and sat_add_time <= ? */
	this.satAddTimeEnd=function(end){if(this.proxy)return this.getProxy().satAddTimeEnd(end);this.put("satAddTimeEnd", end);return this;};
		
		 
	
	
	/** 状态 [非空]   1:正常 0:无效     **/
	this.satStatus=function(satStatus){if(this.proxy)return this.getProxy().satStatus(satStatus);  this.put("satStatus", satStatus);return this;};
	/** and sat_status is null */
	this.satStatusNull=function(){if(this.proxy)return this.getProxy().satStatusNull();if(this.get("satStatusNot")==null)this.put("satStatusNot", "");this.put("satStatus", null);return this;};
	/** not .... */
	this.satStatusNot=function(){if(this.proxy)return this.getProxy().satStatusNot();this.put("satStatusNot", "not");return this;};
	this.satStatusNotNull=function(){if(this.proxy)return this.getProxy().satStatusNotNull();this.put("satStatusNot", "not");this.put("satStatus", null);return this;};
	this.satStatusNot=function(satStatus){if(this.proxy)return this.getProxy().satStatusNot(satStatus);this.put("satStatusNot", "not");this.put("satStatus", satStatus);return this;};
		
		
	this.satStatusIn=function(ids){
		if(this.proxy)return this.getProxy().satStatusIn(ids);  this.put("satStatusIn", ids);return this;
	};	
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有API分类 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/api/apitype.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取API分类分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/api/apitype.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取API分类 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/api/apitype.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

SrvApiType.get = function(id){
	var protocol = ux.ajax("/admin/api/apitype.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.srvApiType;
	return null;
}

SrvApiType.where = new SrvApiType.Where(0,true);